import { actionUserInformationReview } from '../actions';

// 获取资讯数据处理
/**
 * @param  {[]}} state={informationList
 * @param  {} action
 */
export function userInformationReviewReducer(state = {
    informationList: []
}, action) {
    // console.log(action)
    switch(action.type) {
        case `${actionUserInformationReview.RECEIVE_POSTS}Success`:
            return {
                ...state,
                informationList: action.payload.data.children.map(child =>child.data)
            };
        default:
            return state
    }
}